﻿using System.Collections.Generic;

namespace dPet.Application.Services
{
	using dPet.Application.DataObjects;
using dPet.Application.QueryObjects;
using dPet.Infrastructure.Logging;

	public interface IInventoryService
	{
		#region Inventory

		/// <summary>
		/// 获取入库批次记录列表
		/// </summary>
		IEnumerable<InventoryBatchDto> GetInventoryBatches(string hospitalId, InventoryBatchQueryDto queryDto,
			int pageIndex, int pageSize, out int totalNumber);

		/// <summary>
		/// 获取入库批次记录
		/// </summary>
		InventoryBatchDto GetInventoryBatch(string batchId);

		/// <summary>
		/// 添加入库批次，入库操作
		/// </summary>
		MessagedResult<InventoryBatchDto> AddInventoryByBatch(string hospitalId, InventoryBatchDetailDto[] batchDetailDtos, IOperator @operator);

		/// <summary>
		/// 获取库存报损报溢记录列表
		/// </summary>
		IEnumerable<InventoryLORecordDto> GetInventoryLORecords(string hospitalId, InventoryLORecordQueryDto queryDto,
			int pageIndex, int pageSize, out int totalNumber);

		/// <summary>
		/// 库存报损报溢
		/// </summary>
		MessagedResult<bool> ReportInventoryLO(string productId, string inventoryNumber, InventoryLOTypeDto loType, int quantity, IOperator @operator);

		/// <summary>
		/// 库存检测
		/// </summary>
		void CheckProductInventory();

		#endregion

		#region InventoryAlarm

		/// <summary>
		/// 获取库存告警列表
		/// </summary>
		IEnumerable<InventoryAlarmItemDto> GetInventoryAlarms(string hospitalId, 
			int pageIndex, int pageSize, out int totalNumber);

		/// <summary>
		/// 为商品禁用告警
		/// </summary>
		MessagedResult<bool> DisableInventoryAlarm(string productId, InventoryAlarmTypeDto alarmTypeDto, IOperator @operator);

		#endregion
	}
}
